Method for implementing transparent gateway or proxy in a network

ABSTRACT

This invention relates to a method for implementing transparent gateway or proxy in a network, more specifically is characterized in using NAT transformation method in network devices adapting network address transformation method, such as router, gateway and/or switching device. According to the present invention, Client and server can communicate with each other without recognizing gateway though gateway is provided on the network path.

TECHNICAL FIELD

The present invention relates to a method for implementing transparent gateway or transparent proxy on a network, in particular, to a method for implementing transparent gateway or transparent proxy by using modified network address translation (hereinafter, “NAT”) method on a router, a gateway or a switching device, etc., which are implementing NAT method.

BACKGROUND ART

A transparent gateway is a gateway, which allows a user to seem to communicate with a communication partner without the gateway. In other words, a transparent gateway enables a user to perform additional works by transmitting all packets corresponding to a TCP service port to the gateway or proxy without setting the gateway or proxy.

Generally, a proxy or gateway of an intrusion cut off system is most frequently used as a gateway. In a proxy, a user usually sets up or accesses a proxy, and then, accesses further a desired server. However, in a transparent gateway, a user accesses directly to a desired system without acknowledging the existence of a gateway or proxy, whereupon the transparent gateway establishes a connection to the real server after completion of a confirmation procedure, so that the user and the server might believe that they were communicating directly with the partner without a gateway.

Current technology allows constitution of a system of transparent proxy for a web proxy.

Here, if a web service port redirects a designated TCP packet to the proxy on a network device, the proxy fetches all packets and communicates to re-connect to the server by using its own Internet Protocol (hereinafter, “IP”). The above process is possible because the HTTP protocol used on the web contains the host name and URL of the partner web server to be connected to.

Although this method is meaningful in that a user is allowed to directly connect to the server without a designated proxy, a problem arises here, that the server acknowledges not the original client but the proxy to be its client. This constitution is problematic not only in that the server has difficulty in acknowledging the correct client, but also in that it contains a vital disadvantage for adoption of an IP based authentication system. Furthermore, since the server can hardly acknowledge the correct user, it is possible that services cannot be provided to those accessed through the gateway, unless the problem of dues has been solved. Accordingly, enterprises or organizations that have adopted the gateway for security or other purposes may confront the following troubles in connection with operation of the gateway.

First, an additional work for changing the user environment is required. Second, a burdensome process of educating the users for correct use of the gateway will be obligatory. Third, an additional cost incurs for operating help-desks for the parts that are likely to cause problems in use practice by the users. Fourth, even though a transparent web proxy as described above is operated, control servers among numerous systems on the Internet based on IP cannot receive proper services. Fifth, since a transparent web proxy is applicable only to webs capable of acknowledging the destination server existing in an application protocol such as HTTP, a user has first to access a gateway, and then, the server IP from the gateway in order to establish a connection, if the gateway is constituted as a gateway such as Telnet or FTP. Accordingly, implementation of a transparent proxy or transparent gateway is necessary not only for a transparent proxy, but also for application programs about all services based on TCP.

The structure of the Internet, which has experienced rapid growth during recent years, was first created several decades ago when the huge amount of connections it provides currently was unpredictable. As a means for solving problems with the available IP, the concept of NAT has been introduced. The NAT, being a concept based on reuse of private network addresses, applies, in general, to a router and the like in a manner that the router receives data from each ports, translates the source IP address field of an IP packet in accordance with the NAT rule (Mapping Rule) into an authorized IP address, and then, transmits the same.

A network device applied to the above NAT stores an appropriate amount of authorized IP addresses in a separate address pool, and allocates those addresses among the authorized IP addresses that are not used, to the private network, if the private network requests the external network for an accession. Here, translation of the authorized IP address is administered by a NAT table.

FIG. 1 is a conceptual diagram for a general description of the basic NAT. As shown in FIG. 1, in case of an outgoing data flow in the basic NAT, a global address is allocated to the source local IP address and then recorded in the NAT table, the local IP address is translated into a global IP address, and then, transmitted. While in case of an incoming data flow, a local IP address is searched using the global IP address of the destination i.e. the translated source in the above outgoing case, and then, the global IP address is translated into a local IP address. Since the data flows are separated solely by the destination IP addresses in such basic NAT and to make a simultaneous sharing of an IP address by multiple hosts is impossible, translation of addresses is eased while the use rate of an IP address is drastically reduced. A more detailed explanation is given below with reference to FIG. 1.

For example, assuming that host A of the local network communicates with host X of the global network, while host B of the local network communicates with host Y of the global network, the source A's address as well as the global IP address G allocated thereto are recorded in the NAT table for the data flow from A to X. Further, if the same IP address allocated to the data flow from A to X (G) is also allocated to the data flow from B to Y as illustrated in FIG. 1, the local addresses of both A and B are searched so that a confusion arises as to where transmit the data when the NAT table is searched only by the destination address G for transmission of the data from Y in case of incoming in the basic NAT. Accordingly, a plurality of hosts having separate IP addresses in the local network cannot be translated into one and the same global IP simultaneously in the basic NAT. In order to solve this problem, an NAT table is commonly used to keep records on the IP, the ports, etc.

Further in FIG. 1, for the data flow from A to X the source A's address and the port number 100 as well as the allocated global IP address G and the port number 1000 are recorded in the NAT table. Also for the data flow from B to Y, a global address G with a varied port number 2000 can be allocated to the source B's address and the port number 100. In case of an incoming data flow, if the NAT table is searched with the destination address G and the port number 2000 for the purpose of transmitting the data transmitted from Y to B, only B's local address and the port number 100 are searched, thus the data flow from A to X can be separated from the data flow from B to Y

DISCLOSURE OF THE INVENTION

To solve the above problems, an object of the present invention to provide a method for implementing transparent gateway or transparent proxy by using modified network address translation (hereinafter, “NAT”) method on a router, a gateway or a switching device, etc., which are implementing NAT method.

In order to achieve the above objective, the present invention provides a method for implementing transparent gateway or transparent proxy in a network including gateway or proxy, by using network device including a NAT table. In addition, the present invention comprise a first step of confirming whether a source or destination port of a received packet exists in an NAT table and a second step of recording the session in a session information table if the above source or destination port has been confirmed in the above first step to be existent in the above NAT table, and a third step of translating the IP address of the above packet after the above second step.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a conceptual diagram showing the basic NAT technology.

FIG. 2 is a diagram showing a constitution of an IP header.

FIG. 3 is a diagram showing a constitution of a TCP header.

FIG. 4 is a diagram showing a network constitution that a transparent gateway according to the present invention is applied.

FIG. 5 is a conceptual diagram showing a varied NAT technology.

FIG. 6 is a flow chart of an example of TCP session connection process to a general gateway in accordance with the present invention.

FIG. 7 is a flow chart of an example of TCP session connection process of a gateway as set by a transparent proxy in accordance with the present invention.

FIG. 8 is a flow chart of a varied NAT method in accordance with the present invention.

FIG. 9 and FIG. 10 are flow charts showing other embodiment examples of the NAT method in accordance with the present invention.

PREFERRED EMBODIMENTS OF THE INVENTION

The preferred embodiments of the present invention are described below in detail with reference to drawings. FIG. 2 is a diagram showing a constitution of an IP header; FIG. 3 is a diagram showing a constitution of a TCP header; and FIG. 4 is a diagram showing a network constitution that a transparent gateway according to the present invention is applied.

In FIG. 4, a client 10 can directly communicate with a server 70. However, generally a gateway is installed between networks for security or other purposes. A typical example of such gateway is an intrusion cut off system. Various other gateways such as web proxy, SMTP gateway, FTP gateway, Telnet gateway, and etc. can be also considered. When a gateway is installed on a traffic path of a network, the clients commonly have to access the gateway by changing the environment. Then, the gateway accesses to the server again when the clients communicate with the server via an IP data program. Accordingly, the IP header can be changed in the IP data program of a network device 30 including a NAT. If an outgoing packet is a packet requiring a gateway, the destination IP of the packet is changed so that a gateway can receive the packet. Then the packet flows to gateway G1 40 or to G2 50 to subsequently be read and processed by the latter. After the processing is completed, the packet is transmitted back to the network device 30, whereupon the network device 30 changes the source IP of the packet from the gateway IP to the client IP, and then, transmits the same to the server 70.

Now, an explanation on the incoming packet from the server 70 follows. Upon receiving the incoming packet, the network device 30 changes the destination IP from the client IP to the gateway 40, 50 IP. After processing by the gateway 40, 50, the packet is transmitted back to the network device 30, and then, transmitted to the client 10 after the packet's source IP has been changed to the server 70 IP. As such, a communication is performed between the client 10 and the server 70 while the gateway IP remains hidden.

An explanation of examples of the method for implementing a transparent gateway or a transparent proxy in accordance with the present invention is given below, with reference to FIGS. 5 and 6.

FIG. 5 shows a constitution illustrating an embodiment example of the method for implementing a transparent gateway or a transparent proxy in accordance with the present invention using a varied NAT technology, while FIG. 6 is a flow chart of an example of TCP session connection process to a general gateway in accordance with the present invention.

In FIG. 5, host C 100 is a client of which the IP address is C, while host S 110 is a server of which the IP address is S. Now, the NAT table of the network device 130 defines as illustrated in the drawing, i.e. the destination port of the Telnet using port no. 23 is 23, while using the gateway G, and the destination port of the web using port no. 80 is 80, while using the gateway G As shown in FIGS. 5 and 6, host C 100 attempts to establish a communication connection to host S 110. In the course of this procedure, SYN flag is set to TCP packet (C:G, 23 SYN). The TCP header comprises the source port as well as the destination port. The NAT 130 of the network device recognizes that the packets of which the destination port is 23 or 80 shall be transmitted. Here, the packet is routed to the gateway 120 after its destination IP has been changed to G The network device 130 registers in the session information table having the following constitution, so that the routing information is included in the table. Client Port Client IP Mode Server IP Server Port Gateway IP Mode C 1024 S 23 G G

After receiving the packet, the gateway 120 transmits the packet as it is set with SYN and ACK flags through the client 100 to the network device 130 (G, 23:C SYN+ACK). The network device 130, then, determines how to process the packet, with reference to the session information table. Since the source port is 23, it can be known that this packet is a response packet of the client. Accordingly, the packet is transmitted to the client after its source IP has been changed to the server IP.

Then, the client 100 transmits the packet containing an ACK flag (C:G, 23 ACK) further. Herewith, a TCP connection between the client and the gateway is established. A problem with the above procedure is, however, that the real destination IP is not known to the gateway. Thus, the NAT of the network device 130 has to transmit value of the above table back to the gateway 120. As shown in FIG. 6, the network device 130 including the NAT transmits the session information to the gateway 120. Now, the gateway 120 knows the real server IP to which a connection shall be established.

Next, the gateway 120 transmits the packet including a SYN flag (G:S, 23 SYN) in order to connect to the server by a TCP. The gateway IP as a source IP is changed to the packets which is changed to C (G;S, 23 SYN) as the client IP and is transmitted to the gateway with reference to the above table in the network device 130. The server 110 transmits the response packet (S, 23:C SYN+ACK) to the client 100. Here, since the network device 130 first reads and processes the packet, it can be known that the gateway 120 is used in accordance with the value of the above session information. Accordingly, the packet is transmitted to the gateway 120 after its destination IP is changed from client C to gateway (G S, 23:G SYN+ACK).

If the gateway 120 transmits a packet set with an ACK flag (G:S, 23 ACK) back to the server 110, the network device 130 transmits a packet corrected by the client information obtained from the value of the session information table (C:S, 23 ACK) to the server 120. Herewith a TCP connection between the gateway 100 and the server 110 is established. In this way, the real client 100 is TCP connected to the server 110 via the gateway 120.

FIG. 7 is a flow chart of an example of TCP session connection process of a gateway as set by a transparent proxy in accordance with the present invention.

Several general commercial gateways or proxies are capable of recognizing location of the destination, dependent on their application programs, of which the typical examples are relay mail system and web proxy HTTP. In such case, the destination IP is searched within the data of the application programs. However, in this case, since the protocol of the application program is changed when the session information is transmitted to the gateway as in FIG. 6, a problem arises that the commercial program cannot be used as it is provided. For solving this problem, a mode column is provided for in the NAT table in FIG. 5. Here the mode value G, means that it is a general gateway, while the mode value T means that the gateway is a transparent gateway, which can recognize the destination IP.

If the destination port is set to as 80 and the web proxy is set to be the gateway, the mode is set to T and a TCP connection as in FIG. 7 can be established. However, FIG. 7 differs from FIG. 6 in that the session information is not transmitted to the gateway.

FIG. 8 is a flow chart of a varied NAT method according to the present invention.

Upon receiving a packet, it is confirmed whether the packet is a TCP or not S800. The packet is immediately transmitted in case it is not a TCP. In case the packet is a TCP, it is confirmed whether the destination port is in the NAT table S810. If the destination port is not in the NAT table, it is further confirmed whether the source port is in the NAT table S820. If the source port is not in the NAT table, which means that the packet is irrelevant to the gateway, it is transmitted directly to the packet transmission module.

In case the source port or destination port is existent in the NAT table, it is confirmed whether the source IP is a gateway IP S830. As a reference, there can be no instance where a destination IP is a gateway IP, because changing a destination IP to a gateway IP belongs to the function of the NAT.

In case the source IP is not a gateway IP, which means that the packet is a client packet or a server packet, it needs to be processed further correspondingly. If the packet is set with a SYN flag S840, which means that the packet is a session initiating packet, the session is registered in the session information table S850.

After that, it is confirmed whether the gateway mode is G S860 or not. If the gateway mode is not the G but the T, the packet is transmitted directly to the packet transmission module without changing the IP address. If the gateway mode is Q a session search in the session information table is performed 870. The search method determines whether the table has any result or not by searching the unique record including information of a source IP, a source port, a destination IP, and a destination port S880.

In a case that the table yields any result, the destination IP is changed to a gateway IP S900, and the packet is transmitted to the module. In case the table yields no result, the packet is discarded S890. The above description relates to cases where the packet has bee received from the client or the server.

In case, however, the gateway processes and transmits the packet S830, the record in the session information table is searched with destination IP, destination port, gateway IP, and source port S910. After the search, it is confirmed whether the table yields any result S920. In case the table yields any result, the session is deleted from the session table S950 if the packet which is set with a FIN flag occurs in twice or if the packet which is set with a RST flag is processed S940, and the source IP is changed from the gateway IP to the real IP in the table S960 and the packet is transmitted to the packet transmission module.

If the packet which is set with a FIN flag does not occur in twice or if the packet which is set with a RST flag has not been processed in the above step S940, the step of deleting the session 950 is omitted, and the packet is transmitted to the packet transmission module after the source IP is changed form the gateway IP to the real IP in the table.

On the other hand, if the session information table does not contain a record in the above step S920, the packet is discarded S930.

Next, another embodiment example of the method for implementing a transparent gateway or a transparent proxy in accordance with the present invention is explained with reference to FIG. 9 and others. The problematic part in implementing a transparent gateway or a transparent proxy in the above embodiment is the part for transmitting the session information back to the gateway. Alternatively, the system can delete the part for transmitting the session information to the gateway and also be constituted as in FIG. 9 by using the characteristics of TCP/IP that the source port cannot use the same port number simultaneously in case of the clients' connection to the session, unless the destination IP is separately proceed in the gateway. In other words, the session table is changed as in FIG. 9, and a gateway session table is added to.

The process of generating each item in each table in FIG. 9 is explained below. In case a packet with a SYN flag is received, session is added to the session table, unless the source IP is a gateway IP S1000. Then, a gateway session table is added to S1100. After that, the session table is connected to the gateway session table S1200. Then, the gateway session table is connected to the session table as well, to enable search of the session table from the gateway session table S1300. The packet is then corrected based on the information in the gateway session table i.e. the destination IP is corrected from D1 to G1, and then, transmitted to the packet transmission module.

Since the gateway cannot recognize the destination IP, a connection is attempted with the source IP, instead of the destination IP. The destination port is connected to the source port so that the original session is confirmed in the NAT. Here, the main point of the explanation is that although the source IP is connected, the destination IP is connected in real. In such case, although a packet with a SYN flag has been received, the source IP becomes the gateway IP. Here, a field is added to the gateway session table S1400 and the part changing a destination IP to a gateway IP is different in the added field. The session table is connected so as to find the session table in the gateway session table S1500. Here, the session table is searched with the destination table and the source port. Finally, the gateway session table is connected so as to the gateway session in the session table S1600.

Now, the method of address translation in the course of transmission of the real data is explained below. In case the source IP is a gateway IP, the gateway session table is searched. If the destination port exists in the NAT table, the IP is translated in accordance with the information in the session table designated by the Sess of the gateway session table. If, on the contrary, the destination port does not exist in the NAT table, the IP as well as the port are changed to the opposite of the session table designated by the Sess of the gateway session table i.e. the source IP is changed to the destination IP in the session table, the destination IP is changed to the source IP in the session table.

In case the source IP is not a gateway IP, the session table is first searched. If the search has yielded any result, the IP is changed to have a form of the gateway session table designated by CPTR. If the search has yielded no result, a new search is conducted with reversed IP and port, wherein the source address and the destination address are reversed. If the search has yielded any result, the IP is changed to have a form of the gateway session table designated by SPTR.

Next, the process of deleting an item of the session table is explained. If the packet received is one, which has encountered a FIN flag twice, or one set with a RST flag, the session is completely terminated. If the source IP is a gateway IP, the packet is transmitted after having been corrected as in the transmission process of the real data, and then, the corresponding item in the gateway session table is deleted. If the source IP is not a gateway IP, the packet is transmitted after having been corrected as in the transmission process of the real data, and then, the corresponding item in the session table is deleted.

FIG. 10 is a flow chart showing another embodiment of the method according to the present invention as described in FIG. 9.

Here, upon receiving the packet S2000, it is confirmed whether a destination port exists in the NAT table S2010.

If the destination port exists in the NAT table, it is further confirmed whether an SYN flag has been set S2020. If an SYN flag has been set, it is confirmed whether the source IP is a gateway IP S2030.

If the source IP is not a gateway IP, the packets is registered in the session table S2040, as well as in the gateway session table S2050. And then, the packets is connected to the Cptr of the session table S2060 and the IP is changed to the same with the ST.Cptr of the session table S2070.

If the source IP is a gateway IP in the above step S2030, the packets is registered in the gateway session table S2080, and connects the Sptr of the session table S2090. And then, the IP and the port are changed to the same with the Sess of the gateway session table S2100.

If, however, an SYN flag has not been set at the above step S2020, it is confirmed whether the source IP is a gateway IP S2110, and the session is searched in the session table in case the source IP is not a gateway IP S2120. In case the source IP is a gateway IP, the process advances to the step S2200 described below.

Next, it is confirmed whether the source and the destination of the IP are reversed S2130, and then, the IP and the port are changed the same with the ST. Sptr in a case that the source and the destination are reversed S2140. However, the IP and the port are changed the same with ST. Cptr, in case the destination and the port are not reversed.

Then, it is confirmed whether a FIN or RST flag has been set S2160, and the session table is deleted S2170, in case a FIN or RST flag has been set, and the packet is transmitted to the packet transmission module.

If a destination port does not exist in the NAT table at the above step S2010, it is further confirmed whether a source port exists in the NAT table S2180; and the above step S2020 is repeated in case a source port exists in the NAT table, while it is confirmed whether the source IP is identical with the gateway IP S2190 in case a source port does not exist in the NAT table.

In case the source IP is identical with the gateway IP, the session is searched in the gateway session table S2200, and it is confirmed whether the session exists in the table S2210.

In case the session does not exist in the gateway session table, the packet is transmitted immediately to the packet transmission module, while the IP and the port are changed the same with as the Sess of the gateway session table in a case that the session exists in the gateway session table S2220.

Then, it is confirmed whether a FIN or RST flag has been set S2230, and then, the packet is transmitted immediately to the packet transmission module, in case such a flag has been set; while the packet is transmitted to the packet transmission module after the gateway session has been deleted S2240, in case such a flag has been set.

Although the constitution and effects of the present invention have been described above referring to the preferred embodiments of the invention, the scope of rights of the present invention is not limited thereto, but rather shall be determined by the appended claims, allowing various adaptations and modifications, without departing the scope and spirit of the present invention as those skilled in the art will understand.

INDUSTRIAL APPLICABILITY

As described above, the present invention allows a user to communicate with a communication partner through a transparent gateway or a transparent proxy, not noticing the existence thereof, and not requiring any change in the user environment.

Further, the present invention enables a substantial reduction in time and costs in constituting and maintaining a network, by making the obligatory education of the users for use of the gateway unnecessary.

In addition, the present invention allows a control server based on IP to provide with normal services, and ensures transparency even for a proxy or gateway with regard to a protocol, whose destination IP cannot be known from the contents thereof, such as Telnet or FTP. 

1. A method for implementing a transparent gateway or a transparent proxy in a network including gateway or proxy, by using network device including a NAT table, comprising a first step of confirming whether a source or destination port of a received packet exists in said NAT table; a second step of recording the session in a session information table if said source or destination port has been confirmed in said first step to be existent in said NAT table; and a third step of translating the IP address of said packet after the above second step.
 2. The method for implementing a transparent gateway or a transparent proxy as set forth in claim 1, wherein said third step comprising; a step that said session is registered when a SYN flag has been set in a case that the source IP is not a destination IP; a step that said session is searched in the session information table in case that the preset gateway mode is a general gateway mode; a step that the destination IP is changed to the gateway IP when said session search yields any result; and a step that said packet is directly transmitted if the preset gateway mode is a transparent gateway mode.
 3. The method for implementing a transparent gateway or a transparent proxy as set forth in claim 2, wherein said session is searched with source IP, source port, destination IP, and destination port.
 4. The method for implementing a transparent gateway or a transparent proxy as set forth in claim 1, wherein said third step comprising: a step that said session is searched in the session information table if the source IP is a destination IP; and in a case that said session search yields any result, a step that the source IP is changed from the gateway IP to the real source IP after deleting the session from the packets when a FIN or RST flag is set.
 5. The method for implementing a transparent gateway or a transparent proxy as set forth in claim 4, wherein said session is searched with destination IP, destination port, gateway IP, and source port.
 6. A method for implementing a transparent gateway or a transparent proxy in a network including gateway or proxy, by using network device installed with an NAT table, comprising: a first step of confirming whether a source or destination port of a received packet exists in an NAT table; a second step, wherein, if said source or destination port does not exist in said NAT table at said first step, the session is searched in the gateway session table in case the source IP is a gateway IP; while, if the source or destination port exists in said NAT table, the IP port is changed as the session of the gateway session table; and a third step of deleting the gateway session in case a FIN or RST flag has been set.
 7. A method for implementing a transparent gateway or a transparent proxy in a network including gateway or proxy, by using network device installed with an NAT table, comprising: a first step of confirming whether a source or destination port of a received packet exists in said NAT table; a second step of confirming whether a SYN flag has been set, if the source or destination port exists in said NAT table at said first step; and a third step of changing the IP and the port incase a SYN flag has been set at said second step.
 8. The method for implementing a transparent gateway or a transparent proxy as set forth in claim 7, wherein said third step comprising: if the source IP is a gateway IP, a step of registering in the gateway session table; a step of connecting the Sptr of the session table; and a step of changing the IP and the port the same with the gateway session table.
 9. The method for implementing a transparent gateway or a transparent proxy as set forth in claim 7, wherein said third step comprising: if the source IP is not a gateway IP, a step of registering in the session table as well as in the gateway session table; a step of connecting the Cptr of the session table; and a step of changing the IP and the port the same with the ST. Cptr.
 10. A method for implementing a transparent gateway or a transparent proxy in a network including gateway or proxy, by using network device installed with an NAT table, comprising: a first step of confirming whether a source or destination port of a received packet exists in said NAT table; a second step, wherein, if the source or destination port exist in said NAT table at said first step, it is confirmed whether a SYN flag has been set; and a third step of changing the IP and the port in case a SYN flag has not been set at said second step.
 11. A method for implementing a transparent gateway or a transparent proxy as set forth in claim 10, wherein said third step comprising: if the source IP is a gateway IP, a step of searching the session in the gateway session table, and changing the IP and the port the same with the gateway session table and the session in case that the session is existent; and a step of deleting the gateway session in case a FIN or RST flag has been set.
 12. A method for implementing a transparent gateway or a transparent proxy as set forth in claim 10, wherein said third step comprising if the source IP is not a gateway IP, a step of searching the session in the gateway session table, and confirming whether the source IP and the destination IP are reversed in case the session is existent; a step of changing the IP and the port the same with the ST. Sptr in case the source IP and the destination IP are reversed, and deleting the session table in case a FIN or RST flag has been set; and a step of changing the IP and the port the same with the ST. Cptr in case the source IP and the destination IP are not reversed, and deleting the session table in case a FIN or RST flag has been set. 